import Mock from "mockjs"
const shouhoulist =Mock.mock({
    "data|55": [
        {
          // 商品种类
          "goodsClass|1": ["日系漫画高端课程","日系动画学习教程","日系发型高级教学"],
          // 商品Id
          "goodsId|+1": 1,
          //商品名称
          goodsName: "@ctitle(10)",
          //商品地址
          goodsAddress: "@county(true)",
          goodsImg: "/imgs/19.png",
          //商品售价
          "goodsSale|1000-1500": 1500,
          // 邮箱：
          email: "@email",
          // 颜色
          color: "@color",
          name: "@cname",
        }
    ]
});
class Mockapi {
  getshouhoulist(current_page: number, page_size: number) {
    const newList = shouhoulist.data.slice(
      (current_page - 1) * page_size,
      (current_page - 1) * page_size + page_size
    );
    return Promise.resolve({
      status: 0,
      result: newList,
    });
  }
  getshouhoulist1() {
    return Promise.resolve({
      status: 0,
      result: shouhoulist,
    });
  }
}
export const mockapi = new Mockapi();
